﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PFB_15_1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "  Hello World";

            Console.WriteLine("original:" + s);
            Console.WriteLine("lowercase:" + s.ToLower());
            Console.WriteLine("uppercase:" + s.ToUpper());
            Console.WriteLine("trim:" + s.Trim());

            /*
            for (int i = 0; i < s.Length; i++)
            {
                Console.WriteLine(s[i]);
            }

            char[] symbols = s.ToCharArray();

            for (int i = 0; i < symbols.Length; i++)
            {
                Console.WriteLine(symbols[i]);
            }
            */

            string text = "To   be or not to be";
            // 2b||!2b

            //char[] delimators = new char[] { ' ', '.', ',', '-', ';' };
            //string[] words = text.Split(delimators);
            string[] words = text.Split();

            for (int i = 0; i < words.Length; i++)
            {
                if(words[i] == String.Empty)
                {
                    continue;
                }
                Console.WriteLine(words[i]);
            }

            Console.ReadKey();
        }
    }
}
